﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SoundcloudSharp.Endpoints;

namespace SoundcloudSharp.Endpoints.Users
{
    public class Authenticated : SoundcloudAPI
    {
        public Authenticated(SoundcloudConfig config, string authInfo)
            : base(config, authInfo, "")
        {
        }

        public Model.User Me()
        {
            return (Model.User)Mapper.Map<Model.User>(GetJson(AuthInfo));
        }

        private string GetJson(string AuthInfo)
        {
            string uri = string.Format(base.Uri + "/me.json?oauth_token={0}", AuthInfo);
            return HttpClientOld.GET(uri);
        }
    }
}
